home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / rettig.arc / TRSOURCE.EXE / FLR.C < prev    next >
C/C++ Source or Header  |  1990-10-22  |  484b  |  28 lines

  1. /*********
  2. *
  3. * FLR.C
  4. *
  5. * by Tom Rettig
  6. * modified by Leonard Zerman
  7. *
  8. * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
  9. *
  10. *  Syntax: FLR( <expN> )
  11. *  Return: Integer just below <expN>.
  12. *          If no decimal value, integer equal to <expN>.
  13. *********/
  14.  
  15. #include "trlib.h"
  16.  
  17. TRTYPE flr()
  18. {
  19.    double num, ret;
  20.  
  21.    if ( PCOUNT == 1 && ISNUM(1) )
  22.    {
  23.        _retnd(_tr_floor(_parnd(1)));
  24.    }
  25.    else
  26.       _retnd(ERROR);    /* 0 value */
  27. }
  28.